<?php
/* SVN FILE: $Id$ */
/**
 * Short description for file.
 *
 * Long description for file
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.app.config
 * @since         CakePHP(tm) v 0.10.8.2117
 * @version       $Revision$
 * @modifiedby    $LastChangedBy$
 * @lastmodified  $Date$
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 *
 * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded
 * This is an application wide file to load any function that is not used within a class define.
 * You can also use this to include or require any files in your application.
 *
 */
/**
 * The settings below can be used to set additional paths to models, views and controllers.
 * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
 *
 * $modelPaths = array('full path to models', 'second full path to models', 'etc...');
 * $viewPaths = array('this path to views', 'second full path to views', 'etc...');
 * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
 *
 */
global $SQL_PREFIX, $CANCELED, $EVENT_TYPE_BOOKING, $GROUP_FOR_INDIVIDUALS, $TAX_CODES, $OPERATION, $MEMBER_PLANS, $HOURS_CUTOFF;
global $LIGHT_ROW_COLOR, $DARK_ROW_COLOR, $CALENDAR_ROOT, $GOOGLE_MAPS_API_KEY;

date_default_timezone_set('Canada/Pacific');

define('SQL_HOST',     'localhost');
define('SQL_USER',     'root');
define('SQL_PASSWD',   'root');
define('SQL_DATABASE', 'carshare');
define('SQL_PREFIX',   'phpc_');
define('SQL_TYPE',     'mysql');

define('USER_HOME',    'C:/carshare-users/');
define('LOG_FILE',     'C:/carsharelog.txt');
define('GOOGLE_MAPS_API_KEY1', '--GOOGLE MAPS API KEY--');

$ADMIN_EMAIL = "adminEmail@domain.com";
$USER_GUIDE_URL = 'url-to-user-guide';
$GOOGLE_MAPS_API_KEY = Array('URL' => '--GOOGLE MAPS API KEY--', 
							'URL1' => '--GOOGLE MAPS API KEY--', 
							'URL2' => '--GOOGLE MAPS API KEY--');
							
$HOURS_CUTOFF = 8.0; //number of hours where high rate switches to low

$CALENDAR_ROOT = "http://mycarshareurl.com/calendar/"; //use full URL

# ======================================== end configuration

$LIGHT_ROW_COLOR="#FFFFFF";
$DARK_ROW_COLOR="#EEEEEE";

$TAX_CODES['PST_ONLY'] = 1;
$TAX_CODES['GST_ONLY'] = 2;
$TAX_CODES['PST_GST'] = 3;
$TAX_CODES['EXEMPT'] = 4;

$CANCELED['NORMAL']=0;
$CANCELED['CANCELED']=1;
$CANCELED['CANCELED_WITHIN_NO_REFUND_PERIOD']=2;

$OPERATION['CREATE'] = 1;
$OPERATION['MODIFY'] = 2;
$OPERATION['CANCEL'] = 3;
$OPERATION['CANCELED_WITHIN_NO_REFUND_PERIOD'] = 4;
$OPERATION['LOGIN'] = 8;

$MEMBER_PLANS['LOW'] = 1;
$MEMBER_PLANS['MED'] = 2;
$MEMBER_PLANS['HIGH'] = 3;
$MEMBER_PLANS['GROUP'] = 4;

$EVENT_TYPE_BOOKING = 1;
$EVENT_TYPE_RESERVATION = 2;

$GROUP_FOR_INDIVIDUALS = 1;

function get_google_maps_api_key1()
{
	global $GOOGLE_MAPS_API_KEY;

    foreach( $GOOGLE_MAPS_API_KEY as $servername => $k){
        if (substr_count($_SERVER["SERVER_NAME"], $servername )){
            return $k;
        }
    }   
    return "";
}

if(isset($_COOKIE["PHPSESSID"])){ 
        session_id($_COOKIE["PHPSESSID"]); 
}

?>